{
  "properties" : { },
  "id" : "d22077da26714342b530da16fd97d2bb",
  "script" : null,
  "groupId" : "e7e63d1567b343a3925599ff5e40714b",
  "name" : "首页",
  "createTime" : null,
  "updateTime" : 1741077036510,
  "lock" : null,
  "createBy" : null,
  "updateBy" : "可辉",
  "path" : "index",
  "method" : "GET",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"code\": 200,\n    \"msg\": \"success\",\n    \"data\": \"VzlKT3RTQkx4U05UNEJ3eTBCWGhidz09\"\n}",
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
import 'com.wiwf.model.security.service.SysTokenService' as sysTokenService;
import 'com.wiwf.model.manage.service.PageIndexService' as pageIndexService;
import response;

var data = {};
var treeMenus = {};
var token = cookie[sysTokenService.getTokenKey()];

try {
    data = sysTokenService.getTokenUser(token);

    treeMenus = pageIndexService.getNodeTreeMenus(data.menus);
    var params = {
        'userId': data.userId,
        'userName': data.name, 'ctxPath': '../..', 'unitName': data.unitName,
        'treeMenus': treeMenus
    };

    return response.ftl(params, '/page/index')
} catch(e) {
    return response.redirect('/');
}
